// 转换时间方法
export const newdate = (e) => {
  let d = new Date(e)
  let Y = d.getFullYear()
  let M = d.getMonth() + 1
  let D = d.getDate()
  let H = d.getHours()
  let m = d.getMinutes()
  let s = d.getSeconds()
  if (D < 10) {
    D = '0' + D
  }
  if (M < 10) {
    M = '0' + M
  }
  if (H < 10) {
    H = '0' + H
  }
  if (m < 10) {
    m = '0' + m
  }
  if (s < 10) {
    s = '0' + s
  }
  let dates = Y + '.' + M + '.' + D + ' ' + H + ':' + m + ':' + s
  return dates
}
// 获取图片
export const getObjectURL = (file) => {
  var url = null
  if (window.cerateObjectURL != undefined) {
    url = window.cerateObjectURL(file)
  } else if (window.URL != undefined) {
    url = window.URL.createObjectURL(file)
  } else if (window.webkitURL != undefined) {
    url = window.webkitURL.createObjectURL(file)
  }
  return url
}
